package org.example.demos.pattern.observer.animal;

import java.util.List;

public class Breeder{

    protected List<Animal> animalList = AnimalFactory.getAnimals();


    void command(String command) {
        animalList.forEach(animal -> animal.response(command));
    }


    void command(AnimalFactory animal, String command) {
        animal.getAnimal().response(command);
    }
}
